========================================================================= 
Log Path: ./log/logmain.log 
Program Path: /Users/yorke/Dropbox/kuwait_roll_call/2_analysis/replication/02_rep_main.R 
Working Directory: /Users/yorke/Dropbox/kuwait_roll_call/2_analysis/replication 
User Name: yorke 
R Version: 4.3.1 (2023-06-16) 
Machine: AS23C1Q05N arm64 
Operating System: Darwin 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:20:05 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T8101 
Base Packages: stats graphics grDevices utils datasets methods base 
Other Packages: tidylog_1.1.0 logr_1.3.8 common_1.1.3 xtable_1.8-4 stargazer_5.2.3 lubridate_1.9.3 forcats_1.0.0 stringr_1.5.1 dplyr_1.1.4 purrr_1.0.2 readr_2.1.5 tidyr_1.3.1 tibble_3.2.1 ggplot2_3.5.1 tidyverse_2.0.0 
Log Start Time: 2024-07-26 13:04:33.47215 
========================================================================= 

> #### Replication Code for:
> #### Legislative Cooptation in Authoritarian Regimes: Policy Cooperation in the Kuwait National Assembly
> #### Authors: Daniel Tavana and Erin York
> #### Created: 07/22/24
> 
> 
> rm(list = ls())
> library(tidyverse)
> library(stargazer)
> library(xtable)
> library(logr)
> 
> options("logr.autolog" = TRUE)
> 
> # Open the log
> lf <- log_open(file.path("logmain.log"))
> 
> # Send message to log
> log_code()
> 
> 
> # load data ---------------------------------------------------------------
> 
> load("df_cooptationdat.rdata")
> 
> # if using csv formatted data, uncomment the following lines to read in csvs
> #votedf<- read_csv("df_kna_rcv.csv")
> #lawdat<- read_csv("df_kna_laws.csv")
> #oildat<- read_csv("df_kw_oil_monthly.csv")
> #kw_gdp<- read_csv("df_kw_gdp.csv")
> 
> # Construct DV ------------------------------------------------------------
> 
> 
> # generate summary data on minister behavior at the lawvote level
> 
> mins<- votedf %>%
>   filter(min_exact == 1, !is.na(vote)) %>%
>   group_by(lawcodes, term, term_year) %>% 
>   summarise(minpresent = n(),
>             minyes = sum(as.numeric(vote == "yes")),
>             minno = sum(as.numeric(vote == "no")),
>             minabs = sum(as.numeric(vote == "abstain")),
>             minsupport_abs = minyes/minpresent,
>             minsupport_yn = minyes/(minyes+minno),
>             minagainst_yn = minno/(minyes + minno),
>             minabs_prop = minabs/minpresent,
>             minfavor = as.numeric(minyes > minno))
> 
> 
> # votes where all ministers abstained
> allabs<- filter(mins, minyes == 0 & minno == 0)
> 
> # votes where ministers split (yes/no)
> splitvotes<- filter(mins, minyes > 0 & minno >0)
> 
> # add info on minister stance to vote data
> mpdf<- mins %>% 
>   select(lawcodes, term, minfavor) %>% 
>   full_join(votedf) %>%
>   filter(!is.na(vote), mp_exact == 1) %>%
>   # drop votes where no ministers took a stand and split votes
>   filter(!(lawcodes %in% allabs$lawcodes)) %>%
>   filter(!(lawcodes %in% splitvotes$lawcodes)) %>%
>   mutate(rulechange = as.numeric(date > ymd("2007-04-29"))) %>% 
>   # code agreement with ministers - alternate conceptualizations
>   # vote yes on favor, no on unfavor, 0 otherwise
>   mutate(votewithmin = ifelse(minfavor == 1 & vote == "yes", 1, 
>                               ifelse(minfavor == 0 & vote == "no", 1, 0)),
>          # count abstain as favor
>          votewithmin_abs = ifelse(minfavor == 1 & vote == "yes"|vote == "abstain", 1, 
>                                   ifelse(minfavor == 0 & vote == "no"|vote == "abstain", 1, 0)),
>          # count abstain as against
>          abs_no = ifelse(minfavor == 1 & vote == "yes", 1,
>                          ifelse((minfavor == 0 & vote == "no"), 1,
>                                 ifelse(minfavor == 0 & vote == "abstain", 1, 0)))) %>%
>   # primary DV - incorporates rule change in which abstentions after 2007 were effective noes
>   mutate(votewithmin_rulechange = ifelse(rulechange == 0, votewithmin_abs,
>                                          ifelse(vote == "abstain", 0, votewithmin))) 
> 
> 
> 
> 
> # Table 1 -----------------------------------------------------------------
> 
> 
> 
> leg_only<- votedf %>% filter(mp_exact == 1)
> 
> # Table 1 stats
> # top panel - legislator votes
> # NA = absent during vote
> leg_n<- table(leg_only$vote, useNA = "ifany")
> leg_prop<- prop.table(table(leg_only$vote, useNA = "ifany"))
> 
> 
> min_only<- votedf %>% filter(min_exact == 1) 
> 
> # bottom panel - minister votes
> # NA - absent during vote
> min_n<- table(min_only$vote, useNA = "ifany")
> min_prop<- prop.table(table(min_only$vote, useNA = "ifany"))
> 
> actions<- c("Abstain", "No", "Yes", "Absent", "Total")
> t1<- data_frame(Category = c(rep("Legislator votes", 5), rep("Minister votes", 5)),
>                 Action = rep(actions, 2),
>                 N = c(leg_n, nrow(leg_only),
>                       min_n, nrow(min_only)),
>                 Prop = c(leg_prop, 1,
>                          min_prop, 1)) %>%
>   mutate(Action = factor(Action, levels = c("Yes", "No", "Abstain", "Absent", "Total"))) %>%
>   arrange(Category, Action)
> 
> sink(file = "Table1.tex")
> print(xtable(t1), include.rownames = F)
> sink()
> 
> 
> 
> 
> 
> # Table 2 -----------------------------------------------------------------
> 
> 
> 
> # regression dataset
> dat<- mpdf %>%
>   # drop abstentions pre-2007
>   filter(!(date <= ymd("2007-04-29") & vote == "abstain"),
>          # drop missing votes
>          !is.na(vote),
>          # drop individuals who were ministers at the time
>          min_exact == 0) 
> 
> 
> 
> reg1a<-  (lm(votewithmin_rulechange ~ wticonstant_lag_std + term + 
>                ideology_binary + ideoaffil_n_lag +  
>                age_imp + female + edu_imp + 
>                career +shia +
>                tribe_binary + log(swissvote_imp)+byelection +
>                inflation_imp +
>                type_budget + type_treaty + type_general + law_new, dat))
> 
> 
> reg1b<- (lm(votewithmin_rulechange ~ wticonstant_lag_std + term + 
>               ideology_binary + ideoaffil_n_lag +  
>               unique_id +
>               inflation_imp +
>               type_budget + type_treaty + type_general + law_new, dat))
> 
> 
> reg2a<- (lm(votewithmin_rulechange ~ oil_gross_lag_std +  term+  
>               ideology_binary + ideoaffil_n_lag +  
>               age_imp + female + edu_imp + 
>               career +shia +
>               tribe_binary +log(swissvote_imp)+byelection +
>               inflation_imp +
>               type_budget + type_treaty + type_general + law_new, dat))
> 
> reg2b<- (lm(votewithmin_rulechange ~ oil_gross_lag_std +  term+  
>               ideology_binary + ideoaffil_n_lag +  
>               unique_id +
>               inflation_imp +
>               type_budget + type_treaty + type_general + law_new, dat))
> 
> # abbreviated regression for main text 
> # Table 2
> sink("Table2.tex")
> stargazer(reg1a, reg1b, reg2a, reg2b,
>           keep = c("wticonstant*", "oil_gross*", "infl","ideology_binary", "ideoaffil*"),
>           covariate.labels = c("WTI Price", "Oil Revenues", 
>                                "Ideology Dummy", "Cabinet Affiliate",
>                                "Inflation"),
>           add.lines = list(c("Term FEs", rep("\\checkmark", 4)),
>                            c("MP FEs", rep(c("", "\\checkmark"), 2)),
>                            c("MP controls",rep(c("\\checkmark", ""), 2)),
>                            c("Law controls", rep("\\checkmark", 4))),
>           dep.var.labels = "Voting with regime",
>           omit.stat = c("ser", "adj.rsq", "f"),
>           star.cutoffs = c(0.05, 0.01, 0.001))
> sink()
> 
> 
> 
> 
> # Table 3 -----------------------------------------------------------------
> 
> 
> # mechanism exploration:
> 
> ## affiliated minister present for vote
> present1<- (lm(votewithmin_rulechange ~ wticonstant_lag_std + term + 
>                  ideology_binary + ideo_n_present+
>                  age_imp + female + edu_imp + 
>                  career +shia +
>                  tribe_binary + log(swissvote_imp) + byelection +
>                  inflation_imp +
>                  type_budget + type_treaty + type_general + law_new, dat)) 
> 
> present2<- (lm(votewithmin_rulechange ~ wticonstant_lag_std + term + 
>                  ideology_binary +ideoaffil_n_lag+ ideo_n_present+
>                  age_imp + female + edu_imp + 
>                  career +shia +
>                  tribe_binary + log(swissvote_imp) + byelection +
>                  inflation_imp +
>                  type_budget + type_treaty + type_general + law_new, dat))      
> 
> 
> 
> ## affiliated minister holds relevant portfolio; restricted to relevant topics
> topic1<- (lm(votewithmin_rulechange ~ wticonstant_lag_std + term + 
>                ideology_binary + ideo_topic_binary+
>                age_imp + female + edu_imp + 
>                career +shia +
>                tribe_binary + log(swissvote_imp)+byelection +
>                inflation_imp +
>                type_budget + type_treaty + type_general + law_new, 
>              dat %>% filter(topic_religion == 1|
>                               topic_housing == 1|
>                               topic_govt == 1|
>                               topic_edu == 1)))  
> 
> topic2<- (lm(votewithmin_rulechange ~ wticonstant_lag_std + term + 
>                ideology_binary +ideoaffil_n_lag+ ideo_topic_binary+
>                age_imp + female + edu_imp + 
>                career +shia +
>                tribe_binary + log(swissvote_imp)+byelection +
>                inflation_imp +
>                type_budget + type_treaty + type_general + law_new, 
>              dat %>% filter(topic_religion == 1|
>                               topic_housing == 1|
>                               topic_govt == 1|
>                               topic_edu == 1)))  
> 
> 
> 
> ## Table 3
> sink("Table3.tex")
> stargazer(present1, present2, topic1, topic2,
>           keep = c("wticonstant*", "oil_gross*", "ideo*", "infl"),
>           covariate.labels = c("WTI Price",
>                                "Ideology Dummy", 
>                                "Cabinet Affiliate",
>                                "Affiliates Present", 
>                                "Topical Portfolio",
>                                "Inflation"),
>           add.lines = list(
>             c("Term FEs",  rep("\\checkmark", 4)),
>             c("MP controls", rep(c("\\checkmark"), 4)),
>             c("Law controls", rep("\\checkmark", 4)),
>             c("Topical Subset", "", "", "\\checkmark", "\\checkmark")),
>           dep.var.labels = c("Voting with regime"),
>           omit.stat = c("ser", "adj.rsq", "f"),
>           star.cutoffs = c(0.05, 0.01, 0.001), 
>           star.char = c("*", "**", "***"))
> sink()
> 
> 
> 
> # Table 4 -----------------------------------------------------------------
> 
> # interaction of oil price and ideology indicator
> 
> reg3a<- (lm(votewithmin_rulechange ~ wticonstant_lag_std *ideology_binary + term  + 
>               age_imp + female + edu_imp + 
>               career +shia +
>               tribe_binary + log(swissvote_imp) + byelection +
>               inflation_imp +
>               type_budget + type_treaty + type_general + law_new, dat))
> 
> reg3b<- (lm(votewithmin_rulechange ~ oil_gross_lag_std *ideology_binary +  term + 
>               age_imp + female + edu_imp + 
>               career +shia +
>               tribe_binary + log(swissvote_imp) + byelection +
>               inflation_imp +
>               type_budget + type_treaty + type_general + law_new, dat))
> 
> 
> # Table 4
> sink("Table4.tex")
> stargazer(reg3a, reg3b,
>           keep = c("wticonstant*", "oil_gross*", "ideology_binary", "infl"),
>           covariate.labels = c("WTI Price", "Oil Revenues", 
>                                "Ideology Dummy", "Inflation", "WTI x Ideo", "Oil x Ideo"),
>           add.lines = list(
>             c("Term FEs",  rep("\\checkmark", 4)),
>             c("MP controls", rep("\\checkmark", 2)),
>             c("Law controls", rep("\\checkmark", 2))),
>           dep.var.labels = c("Voting with regime"),
>           omit.stat = c("ser", "adj.rsq", "f"),
>           star.cutoffs = c(0.1, 0.05, 0.01, 0.001), 
>           star.char = c("+", "*", "**", "***"))
> sink()
> # note - there is an error in the table notes which must be manually corrected
> # \multicolumn{2}{r}{$^{+}$p$<$0.1; $^{*}$p$<$0.05; $^{**}$p$<$0.01; $^{***}$p$<$0.001} 
> 
> 
> # Figure 1 ----------------------------------------------------------------
> 
> ## See 03_rep_external.R for replication code
> 
> # Figure 2 ----------------------------------------------------------------
> 
> 
> mindate<- ymd("1963-01-01")
> maxdate<- ymd("2016-01-01")
> 
> f2_left<- oildat %>% mutate(key = "WTI price") %>%
>   ggplot(aes(x = monthyear, y = wticonstant, lty = key)) + geom_line() +
>   xlim(c(mindate, maxdate)) +
>   theme_bw() +
>   xlab("") +
>   ylab("Constant 2016 Dollars") +
>   theme(legend.position = "bottom", legend.title = element_blank())
> 
> 
> f2_right<- kw_gdp %>% 
>   # GDP in constant 2016 dollars
>   mutate(gdp_adj = gdp/inflation_multiplier) %>%
>   gather(key, value, oilrents_adj:gdp_adj) %>% 
>   mutate(key2 = ifelse(key == "oilrents_adj", "Oil Rents", "GDP")) %>%
>   ggplot(aes(x = year, y = value, lty = key2)) + geom_line() +
>   xlim(c(year(mindate), year(maxdate))) +
>   theme_bw() +
>   xlab("") +
>   ylab("Constant 2016 Dollars") +
>   theme(legend.position = "bottom", legend.title = element_blank())
> 
> ggsave(f2_left, file = "Figure2_leftpanel.pdf",
>       width = 5, height = 5)
> 
> ggsave(f2_right, file = "Figure2_rightpanel.pdf",
>        width = 5, height = 5)
> 
> 
> 
> # Figure 3 ----------------------------------------------------------------
> 
> 
> 
> terms<- c("1963", "1967", "1971", "1975", "1981", 
>           "1985", "1992", "1996", "1999", "2003",
>           "2006", "2008", "2009", "2012.1", "2012.2",
>           "2013", "2016")
> legstarts<- c("1963-1-23", "1967-1-25", "1971-1-23", "1975-1-27", "1981-2-23",
>               "1985-2-26", "1992-10-5", "1996-10-7", "1999-7-3", "2003-7-6",
>               "2006-6-29", "2008-5-17", "2009-5-16", "2012-2-1", "2012-12-1",
>               "2013-7-27", "2016-11-29")
> parls<- data_frame(legstarts = legstarts[1:16],
>                    term_year = terms[1:16])
> 
> 
> 
> ### cabinet characteristics
> # Figure 3
> f3<- votedf %>%
>   mutate(cab_group = ifelse(ideology!= "Unaffiliated", ideology, 
>                             ifelse(sabah== 1, "Sabah", "Other"))) %>%
>   filter(min_exact == 1) %>% 
>   select(date, unique_id, cab_group) %>%
>   unique() %>% group_by(date) %>%
>   summarise(n(),
>             sabah = sum(cab_group == "Sabah"),
>             mb = sum(cab_group == "Muslim Brotherhood"),
>             islamist = sum(cab_group == "Independent Islamist"),
>             lp = sum(cab_group == "Populist-Leftist"),
>             natlib = sum(cab_group == "National-Liberal"),
>             salafi = sum(cab_group == "Salafi"),
>             shia= sum(cab_group == "Shia Islamist"),
>             other = sum(cab_group == "Other")) %>% 
>   gather(type, number, sabah:other) %>%
>   mutate(prop = number/`n()`,
>          type = factor(type, levels = c("shia",
>                                         "salafi", "islamist", "lp",
>                                         "natlib", "mb", "other", "sabah"),
>                        labels = c("Shia Islamist",
>                                   "Salafi", "Ind. Islamist", "Left-Populist",
>                                   "National Liberal", "Muslim Brotherhood","Other",  "Sabah"))) %>%
>   ggplot(aes(x = date, y = prop, fill = type)) + geom_area(color = "black") +
>   theme_bw() +
>   geom_vline(data = parls, aes(xintercept = ymd(legstarts)), lty = 2, color = "DarkGray") + 
>   scale_fill_viridis_d(name = "",option = "G", direction = -1, begin = .25) +
>   ylab("Proportion of Cabinet") +
>   xlab("") +
>   theme(legend.position = "bottom") +
>   geom_rect(aes(xmin = ymd("1976-8-29"), xmax = ymd("1981-2-23"), ymin = 0.0, ymax = 1.0), fill = "black", alpha = .5) +
>   geom_rect(aes(xmin = ymd("1986-7-03"), xmax = ymd("1992-10-5"), ymin = 0.0, ymax = 1.0), fill = "black", alpha = .5)
> 
> 
> ggsave(f3, filename = "Figure3.pdf",
>        width = 8, height = 5.25)  
> 
> 
> # Figure 4 ----------------------------------------------------------------
> 
> 
> 
> 
> a<- dat %>% 
>   group_by(term_year) %>%
>   mutate(termstart = ymd(plyr::mapvalues(term_year, from = terms, to = legstarts))) %>%
>   mutate(my = floor_date(date, "quarter")) %>% 
>   group_by(term_year, termstart, my) %>%
>   summarise(support = mean(votewithmin),
>             opposition = 1-support,
>             date=first(date)) %>% 
>   ungroup() %>%
>   mutate(ttl = my - termstart)
> a$group <- NA
> a$group[a$term_year <= 1977] <- 1
> a$group[a$term_year > 1977 & a$term_year < 1987] <- 2
> a$group[a$term_year > 1988] <- 3
> 
> ## figure 4
> f4<- ggplot(a, aes(x = date, y = support, group=group)) + geom_line() +
>   scale_color_manual(values="black")+
>   scale_fill_manual(values=c("black"))+
>   theme_bw() +
>   ylab("Proportion of MPs voting with minister bloc") + 
>   xlab("Year") +
>   theme_bw() + 
>   geom_vline(data = parls, aes(xintercept = ymd(legstarts)), lty = 2, color = "Gray") + 
>   scale_x_date(
>     date_labels = "%Y",
>     breaks = function(x) seq.Date(from = min(as.Date("1965-01-01")), to = max(as.Date("2015-01-01")), by = "5 years"),
>     minor_breaks = NULL,
>     expand=c(0.01,0)
>   ) +
>   scale_y_continuous(
>     breaks=seq(0, .9, .1),
>     minor_breaks = NULL,
>     limits = c(0,1),
>     expand = expand_scale(mult = c(0, .02))
>   ) + 
>   xlab("") +
>   theme(panel.grid.major.x=element_blank(), legend.position = "none") 
> 
> ggsave(f4, filename = "Figure4.pdf",
>       height = 5, width = 8)
> 
> 
> 
> 
> # Figure 5 ----------------------------------------------------------------
> 
> 
> a<- votedf %>% 
>   filter(min_exact == 1, !(term %in% c("kna_rcv_2012_2", "kna_rcv_2012_1"))) %>% 
>   select(unique_id, ideology, term_year, monthyear) %>% 
>   unique() %>% 
>   group_by(term_year) %>% 
>   summarise(ideo = mean(ideology != "Unaffiliated")) %>%
>   mutate(group = "Cabinet")
> 
> b<- votedf %>% 
>   filter(mp_exact == 1, !(term %in% c("kna_rcv_2012_2", "kna_rcv_2012_1"))) %>% 
>   select(unique_id, ideology, term_year) %>% 
>   unique() %>% 
>   group_by(term_year) %>% 
>   summarise(ideo = mean(ideology != "Unaffiliated")) %>%
>   mutate(group = "KNA")
> 
> 
> plot_cols<- RColorBrewer::brewer.pal(6, "Paired")
> 
> # Figure 5
> f5<- a %>% bind_rows(b) %>% 
>   ggplot(aes(x = term_year, y = ideo, color = group, shape = group, lty = group)) + 
>   geom_smooth() + 
>   geom_point(size = 2.5) + 
>   theme_bw() + 
>   xlab("") +
>   ylab("Prop. with Ideological Affiliation") +
>   scale_color_manual(name = "",values = c(plot_cols[5], plot_cols[2])) +
>   scale_linetype(name = "") +
>   scale_shape(name = "") +
>   theme(legend.position = "bottom")
> 
> ggsave(f5, filename = "Figure5.pdf",
>       width= 8, height = 5)
> 
> 
> 
> # Table A1 ----------------------------------------------------------------
> 
> ta1<-full_join(
>   votedf %>%
>     filter(!is.na(term_year)) %>%
>     mutate(term_year = as.character(term_year)) %>%
>     mutate(term_year = case_when(
>       term_year == "2012.1" ~ "2012-1",
>       term_year == "2012.2" ~ "2012-2",
>       TRUE ~ term_year)) %>%
>     group_by(term_year) %>%
>     summarise(votes = n()),
>   lawdat %>%
>     filter(!is.na(term_year)) %>%
>     group_by(term_year) %>%
>     summarise(
>       laws = n(),
>       missing = sum(is.na(ResponseId)))) %>%
>   mutate(missing_prop = missing/laws,
>          transcripts = c(228,203,237,107,219,92,243,181,218,158,69,35,118,29,35,122))
> 
> # note - this table was manually formatted
> 
> sink(file = "TableA1.tex")
> print(xtable(ta1), include.rownames = F)
> sink()
> 
> # Table A2 ----------------------------------------------------------------
> 
> 
> ## Table A2
> # mp dat by term
> mpdat<- votedf %>%
>   filter(mp_exact == 1) %>%
>   select(unique_id, knaed_number, term_year, 
>          birthyear, female,
>          occ_recent, education,
>          shia, ideology,
>          tribe_binary, sabah) %>%
>   unique() 
> 
> # summary stats
> mpmeans<- mpdat %>%
>   mutate(age = term_year - birthyear,
>          edu_known = as.numeric(!is.na(education))) %>%
>   mutate(occ_recent = ifelse(is.na(occ_recent), "Missing", occ_recent),
>          private = as.numeric(str_detect(occ_recent, "Private")),
>          public = as.numeric(str_detect(occ_recent, "Public")),
>          other = ifelse(private + public == 0, 1, 0)) %>%
>   summarise(Age = mean(age, na.rm = T),
>             Female = mean(female), 
>             Education_known = mean(edu_known),
>             Edu_secondary = mean(education == "secondary", na.rm = T),
>             Edu_bachelor = mean(education == "bachelor", na.rm = T),
>             Edu_postgraduate = mean(education == "doctorate"| education == "masters", na.rm = T),
>             Occ_public = mean(public, na.rm = T),
>             Occ_private = mean(private, na.rm = T),
>             Occ_other = mean(other, na.rm = T),
>             Ideo_none = mean(ideology == "Unaffiliated"),
>             Ideo_natlib = mean(ideology == "National-Liberal"),
>             Ideo_leftpop = mean(ideology == "Populist-Leftist"),
>             Ideo_mb = mean(ideology == "Muslim Brotherhood"),
>             Ideo_salafi = mean(ideology =="Salafi"),
>             Ideo_islamist = mean(ideology == "Independent Islamist"),
>             Ideo_shia = mean(ideology == "Shia Islamist"),
>             Tribal = mean(tribe_binary),
>             Shia = mean(shia),
>             Sabah = mean(sabah, na.rm = T)) %>%
>   t()
> 
> 
> # min dat by term
> mindat<- votedf %>%
>   filter(min_exact == 1) %>%
>   select(unique_id, knaed_number, term_year, 
>          birthyear, female,
>          occ_recent, education,
>          shia, ideology,
>          tribe_binary, sabah) %>%
>   unique() 
> 
> # summary stats
> minmeans<- mindat %>%
>   mutate(age = term_year - birthyear,
>          edu_known = as.numeric(!is.na(education))) %>%
>   mutate(occ_recent = ifelse(is.na(occ_recent), "Missing", occ_recent),
>          private = as.numeric(str_detect(occ_recent, "Private")),
>          public = as.numeric(str_detect(occ_recent, "Public")),
>          other = ifelse(private + public == 0, 1, 0)) %>%
>   summarise(age = mean(age, na.rm = T),
>             female = mean(female), 
>             edu_known = mean(edu_known),
>             secondary = mean(education == "secondary", na.rm = T),
>             bachelor = mean(education == "bachelor", na.rm = T),
>             postgraduate = mean(education == "doctorate"| education == "masters", na.rm = T),
>             occ_public = mean(public, na.rm = T),
>             occ_private = mean(private, na.rm = T),
>             occ_other = mean(other, na.rm = T),
>             ideo_none = mean(ideology == "Unaffiliated"),
>             ideo_natlib = mean(ideology == "National-Liberal"),
>             ideo_leftpop = mean(ideology == "Populist-Leftist"),
>             ideo_mb = mean(ideology == "Muslim Brotherhood"),
>             ideo_salafi = mean(ideology =="Salafi"),
>             ideo_islamist = mean(ideology == "Independent Islamist"),
>             ideo_shia = mean(ideology == "Shia Islamist"),
>             tribal = mean(tribe_binary),
>             shia = mean(shia),
>             sabah = mean(sabah)) %>%
>   t()
> 
> # note - this table was manually formatted
> 
> ta2<- data_frame(attribute = c(rownames(mpmeans), "Observations"),
>                  Legislators = c(mpmeans, nrow(mpdat)),
>                  Ministers = c(minmeans, nrow(mindat)))
> 
> sink(file = "TableA2.tex")
> print(xtable(ta2), include.rownames = F)
> sink()
> 
> 
> 
> # Table A3 ----------------------------------------------------------------
> 
> 
> laws<- votedf %>%
>   select(lawcodes, date, nyes, nno) %>% unique()
> 
> lawdat_select<- lawdat %>%
>   rename(lawcodes = id) %>%
>   select(lawcodes, lawtype, lawtopic, law_title)
> 
> ## appendix table A3
> # 26 votes passed against min opposition
> ta3<- filter(mins, minno > 0 & minyes == 0) %>%
>   left_join(laws) %>%
>   mutate(lawcode = as.numeric(lawcodes)) %>%
>   left_join(lawdat_select) %>% 
>   arrange(date) %>%
>   ungroup() %>%
>   mutate(mp_no = nno - minno,
>          mp_margin = nyes - mp_no) %>% 
>   filter(mp_margin > 0) %>%
>   mutate(prediss = c(rep("No", 18), "Yes", rep("No", 4), "Yes","Yes", "No")) %>%
>   select(term_year, date, prediss, minno, mp_margin, lawtype, law_title) %>%
>   mutate(lawtype = plyr::mapvalues(lawtype, from = c("Budgets", "General_laws"), to = c("Budget", "General")),
>          date = as.character(date))
> colnames(ta3)<- c("Term", "Date", "Pre-Dissolution", "Min Votes Against", "MP Vote Margin", "Law Type", "Law Subject")
> 
> ## note - law subject was translated manually by authors
> ## table was manually formatted for line breaks
> sink(file = "TableA3.tex")
> print(xtable(ta3, digits = 0), include.rownames = F)
> sink()
> 
> 
> # Table A4 ----------------------------------------------------------------
> 
> 
> 
> # full regression table for appendix
> # Table A4
> sink("TableA4.tex")
> stargazer(reg1a, reg1b, reg2a, reg2b,
>           omit = c("term*", "unique*"),
>           covariate.labels = c("WTI Price", "Oil Revenues",
>                                "Ideology Dummy","Cabinet Affiliate",
>                                "Age", "Female", 
>                                "Edu - Post-graduate",
>                                "Edu - Missing",
>                                "Edu - Secondary",
>                                "Occ - Other",
>                                "Occ - Private",
>                                "Occ - Public", 
>                                "Shia", "Tribe Dummy",
>                                "Log Swiss Vote", 
>                                "By-election",
>                                "Inflation",
>                                "Law Type - Budget", "Law Type - Treaty",
>                                "Law Type - General",
>                                "New Law"),
>           add.lines = list(c("Term FEs", rep("\\checkmark", 6)),
>                            c("MP FEs", rep(c("", "\\checkmark"), 3))),
>           dep.var.labels = "Voting with regime",
>           dep.var.caption = "",
>           omit.stat = c("ser", "adj.rsq", "f"),
>           star.cutoffs = c(0.05, 0.01, 0.001))
> sink()
> 
> 
> # Table A5 ----------------------------------------------------------------
> 
> 
> # Table A5 
> ## extended version of Table 4
> sink("TableA5.tex")
> stargazer(reg3a, reg3b,
>           omit = c("term*"),
>           covariate.labels = c("WTI Price", "Oil Revenues",
>                                "Ideology Dummy",
>                                "Age", "Female", 
>                                "Edu - Post-graduate",
>                                "Edu - Missing",
>                                "Edu - Secondary", 
>                                "Occ - Other",
>                                "Occ - Private",
>                                "Occ - Public", 
>                                "Shia", "Tribe Dummy",
>                                "Log Swiss Vote", 
>                                "By-election",
>                                "Inflation",
>                                "Law Type - Budget", "Law Type - Treaty",
>                                "Law Type - General",
>                                "New Law",
>                                "WTI x Ideo",
>                                "Oil x Ideo"),
>           add.lines = list(
>             c("Term FEs",  rep("\\checkmark", 4))),
>           dep.var.labels = c("Voting with regime"),
>           dep.var.caption = "",
>           omit.stat = c("ser", "adj.rsq", "f"),
>           star.cutoffs = c(0.1, 0.05, 0.01))
> sink()
> 
> 
> # Table A6 ----------------------------------------------------------------
> 
> 
> 
> # supplementary materials - probit analysis
> ### warning - runs quite slow!
> reg1ap<-  (glm(votewithmin_rulechange ~ wticonstant_lag_std + term + 
>                  ideology_binary + ideoaffil_n_lag +  
>                  inflation_imp +
>                  age_imp + female + edu_imp + 
>                  career +shia +
>                  tribe_binary + log(swissvote_imp)+byelection +
>                  type_budget + type_treaty + type_general + law_new, dat,
>                family = binomial(link = "probit")))
> 
> reg1bp<- (glm(votewithmin_rulechange ~ wticonstant_lag_std + term + 
>                 ideology_binary + ideoaffil_n_lag +  
>                 inflation_imp +
>                 unique_id +
>                 type_budget + type_treaty + type_general + law_new, dat,
>               family = binomial(link = "probit")))
> 
> 
> reg2ap<- (glm(votewithmin_rulechange ~ oil_gross_lag_std +  term+  
>                 ideology_binary + ideoaffil_n_lag +  
>                 inflation_imp +
>                 age_imp + female + edu_imp + 
>                 career +shia +
>                 tribe_binary +log(swissvote_imp)+byelection +
>                 type_budget + type_treaty + type_general + law_new, dat,
>               family = binomial(link = "probit")))
> 
> reg2bp<- (glm(votewithmin_rulechange ~ oil_gross_lag_std +  term+  
>                 ideology_binary + ideoaffil_n_lag +  
>                 inflation_imp +
>                 unique_id +
>                 type_budget + type_treaty + type_general + law_new, dat,
>               family = binomial(link = "probit")))
> 
> # Table A6
> sink("TableA6.tex")
> stargazer(reg1ap, reg1bp, reg2ap, reg2bp,
>           keep = c("wticonstant*", "oil_gross*", "ideo*", "infl"),
>           covariate.labels = c("WTI Price", "Oil Revenues", "Ideology Dummy", "Cabinet Affiliate",
>                                "Inflation"
>           ),
>           add.lines = list(c("Term FEs", rep("\\checkmark", 4)),
>                            c("MP FEs", rep(c("", "\\checkmark"), 2)),
>                            c("MP controls",rep(c("\\checkmark", ""), 2)),
>                            c("Law controls", rep("\\checkmark", 4))),
>           dep.var.labels = "Voting with regime",
>           omit.stat = c("ser", "adj.rsq", "f"),
>           float = F,
>           star.cutoffs = c(0.05, 0.01, 0.001),
>           star.char = c("*", "**", "***"))
> sink()
> 
> 
> 
> # Table A7 ----------------------------------------------------------------
> 
> 
> abs<- mpdf %>%
>   mutate(abs_pro = ifelse(date <= ymd("2007-04-29"), votewithmin_abs, votewithmin_rulechange),
>          abs_neg = votewithmin) %>%
>   filter(min_exact == 0)
> 
> ## abstention = pro-regime pre 2007
> abspro1 <- (lm(abs_pro ~ wticonstant_lag_std + term + 
>                  ideology_binary + ideoaffil_n_lag +  
>                  inflation_imp +
>                  unique_id +
>                  type_budget + type_treaty + type_general + law_new, abs))
> 
> abspro1a<-  (lm(abs_pro ~ wticonstant_lag_std + term + 
>                   ideology_binary + ideoaffil_n_lag +  
>                   age_imp + female + edu_imp + 
>                   career +shia +
>                   tribe_binary + log(swissvote_imp)+byelection +
>                   inflation_imp +
>                   type_budget + type_treaty + type_general + law_new, abs))
> 
> ## abstention = anti-regime pre 2007
> absneg1<- (lm(abs_neg ~ wticonstant_lag_std + term + 
>                 ideology_binary + ideoaffil_n_lag +  
>                 inflation_imp +
>                 unique_id +
>                 type_budget + type_treaty + type_general + law_new, abs))
> 
> absneg1a<-  (lm(abs_neg ~ wticonstant_lag_std + term + 
>                   ideology_binary + ideoaffil_n_lag +  
>                   age_imp + female + edu_imp + 
>                   career +shia +
>                   tribe_binary + log(swissvote_imp)+byelection +
>                   inflation_imp +
>                   type_budget + type_treaty + type_general + law_new, abs))
> 
> # Table A7
> sink("TableA7.tex")
> stargazer(abspro1a, abspro1, absneg1a, absneg1, 
>           keep = c("wticonstant*",  "ideo*", "infl"),
>           covariate.labels = c("WTI Price","Ideology Dummy", "Cabinet Affiliate",
>                                "Inflation"
>           ),
>           add.lines = list(c("Term FEs", rep("\\checkmark", 6)),
>                            c("MP FEs", rep(c("", "\\checkmark"), 3)),
>                            c("MP controls",rep(c("\\checkmark", ""), 3)),
>                            c("Law controls", rep("\\checkmark", 6))),
>           dep.var.labels = c("Voting with regime - ", "Voting with regime - "),
>           column.labels   = c("Abstention coded as Anti-Regime", "Abstention coded as Pro-Regime"),
>           column.separate = c(2, 2),
>           omit.stat = c("ser", "adj.rsq", "f"),
>           float = F,
>           star.cutoffs = c(0.05, 0.01, 0.001))
> sink()
> 
> 
> # Table A8 ----------------------------------------------------------------
> 
> # absences
> mpdf_absence<- mins %>% 
>   select(lawcodes, term, minfavor) %>% 
>   full_join(votedf) %>%
>   filter(mp_exact == 1 & min_exact == 0) %>%
>   # drop votes where no ministers took a stand and split votes
>   filter(!(lawcodes %in% allabs$lawcodes)) %>%
>   filter(!(lawcodes %in% splitvotes$lawcodes)) %>%
>   #  mutate(postlib = as.numeric(term_year >= 1996))
>   mutate(rulechange = as.numeric(date > ymd("2007-04-29"))) %>% 
>   # code agreement with ministers
>   # vote yes on favor, no on unfavor, 0 otherwise
>   mutate(votewithmin = ifelse(minfavor == 1 & vote == "yes", 1, 
>                               ifelse(minfavor == 0 & vote == "no", 1, 0)),
>          # count abstains as favor
>          votewithmin_abs = ifelse(minfavor == 1 & vote == "yes"|vote == "abstain", 1, 
>                                   ifelse(minfavor == 0 & vote == "no"|vote == "abstain", 1, 0)),
>          abs_no = ifelse(minfavor == 1 & vote == "yes", 1,
>                          ifelse((minfavor == 0 & vote == "no"), 1,
>                                 ifelse(minfavor == 0 & vote == "abstain", 1, 0)))) %>%
>   mutate(votewithmin_rulechange = ifelse(rulechange == 0, votewithmin_abs,
>                                          ifelse(vote == "abstain", 0, votewithmin))) %>% 
>   mutate(abs_pro = ifelse(date <= ymd("2007-04-29"), votewithmin_abs, votewithmin_rulechange),
>          abs_neg = votewithmin) %>%
>   mutate(vote_abs_pro = ifelse(is.na(abs_pro), 1, abs_pro),
>          vote_abs_anti = ifelse(is.na(abs_pro), 0, abs_neg),
>          na_vote = as.numeric(is.na(vote)))
> 
> 
> 
> 
> ## absence + abstention = pro-regime stance
> absencepro1 <- (lm(vote_abs_pro ~ wticonstant_lag_std + term + 
>                      ideology_binary + ideoaffil_n_lag +  
>                      inflation_imp +
>                      unique_id +
>                      type_budget + type_treaty + type_general + law_new, 
>                    mpdf_absence ))
> 
> 
> # absence + abstention = anti-regime
> absenceneg1 <- (lm(vote_abs_anti ~ wticonstant_lag_std + term + 
>                      ideology_binary + ideoaffil_n_lag +  
>                      inflation_imp +
>                      unique_id +
>                      type_budget + type_treaty + type_general + law_new, 
>                    mpdf_absence ))
> 
> 
> # Table A8
> sink("TableA8.tex")
> stargazer(absenceneg1, absencepro1, 
>           keep = c("wticonstant*",  "ideo*", "infl"),
>           covariate.labels = c("WTI Price","Ideology Dummy", "Cabinet Affiliate",
>                                "Inflation"
>           ),
>           add.lines = list(c("Term FEs", rep("\\checkmark", 6)),
>                            c("MP FEs", rep(c( "\\checkmark"), 2)),
>                            c("Law controls", rep("\\checkmark", 6))),
>           dep.var.labels = c("Voting with regime - ", "Voting with regime - "),
>           column.labels   = c("Absence coded as Anti-Regime", "Absence coded as Pro-Regime"),
>           omit.stat = c("ser", "adj.rsq", "f"),
>           star.cutoffs = c(0.05, 0.01, 0.001))
> sink()
> 
> 
> 
> 
> # Table A9 ----------------------------------------------------------------
> 
> 
> 
> reg1_lag3<- (lm(votewithmin_rulechange ~ wticonstant_lag_std + term + 
>                   ideology_binary + ideoaffil_n_lag3 +  
>                   unique_id +
>                   inflation_imp +
>                   type_budget + type_treaty + type_general + law_new, dat))
> 
> reg1a_lag3<-  (lm(votewithmin_rulechange ~ wticonstant_lag_std + term + 
>                     ideology_binary + ideoaffil_n_lag3 +  
>                     age_imp + female + edu_imp + 
>                     career +shia +
>                     tribe_binary + log(swissvote_imp)+byelection +
>                     inflation_imp +
>                     type_budget + type_treaty + type_general + law_new, dat))
> 
> reg2_lag3<- (lm(votewithmin_rulechange ~ oil_gross_lag_std +  term+  
>                   ideology_binary + ideoaffil_n_lag3 +  
>                   unique_id +
>                   inflation_imp +
>                   type_budget + type_treaty + type_general + law_new, dat))
> 
> reg2a_lag3<- (lm(votewithmin_rulechange ~ oil_gross_lag_std +  term+  
>                    ideology_binary + ideoaffil_n_lag3 +  
>                    age_imp + female + edu_imp + 
>                    career +shia +
>                    tribe_binary +log(swissvote_imp)+byelection +
>                    inflation_imp +
>                    type_budget + type_treaty + type_general + law_new, dat))
> 
> # robustness to lag specifications - 3 months
> # Table A9
> sink("TableA9.tex")
> stargazer(reg1a_lag3, reg1_lag3, reg2a_lag3, reg2_lag3,
>           keep = c("wticonstant*", "oil_gross*", "ideology_binary", "ideoaffil*", "infl"),
>           covariate.labels = c("WTI Price", "Oil Revenues", 
>                                "Ideology Dummy", "Cabinet Affiliate - 3 month lag",
>                                "Inflation"),
>           add.lines = list(c("Term FEs", rep("\\checkmark", 8)),
>                            c("MP FEs", rep(c("", "\\checkmark"), 4)),
>                            c("MP controls",rep(c("\\checkmark", ""), 4)),
>                            c("Law controls", rep("\\checkmark", 8))),
>           dep.var.labels = "Voting with regime",
>           omit.stat = c("ser", "adj.rsq", "f"),
>           star.cutoffs = c(0.05, 0.01, 0.001))
> sink()
> 
> 
> # Table A10 ---------------------------------------------------------------
> 
> 
> reg1_lag5<- (lm(votewithmin_rulechange ~ wticonstant_lag_std + term + 
>                   ideology_binary + ideoaffil_n_lag5 +  
>                   unique_id +
>                   inflation_imp +
>                   type_budget + type_treaty + type_general + law_new, dat))
> 
> reg1a_lag5<-  (lm(votewithmin_rulechange ~ wticonstant_lag_std + term + 
>                     ideology_binary + ideoaffil_n_lag5 +  
>                     age_imp + female + edu_imp + 
>                     career +shia +
>                     tribe_binary + log(swissvote_imp)+byelection +
>                     inflation_imp +
>                     type_budget + type_treaty + type_general + law_new, dat))
> 
> reg2_lag5<- (lm(votewithmin_rulechange ~ oil_gross_lag_std +  term+  
>                   ideology_binary + ideoaffil_n_lag5 +  
>                   unique_id +
>                   inflation_imp +
>                   type_budget + type_treaty + type_general + law_new, dat))
> 
> reg2a_lag5<- (lm(votewithmin_rulechange ~ oil_gross_lag_std +  term+  
>                    ideology_binary + ideoaffil_n_lag5 +  
>                    age_imp + female + edu_imp + 
>                    career +shia +
>                    tribe_binary +log(swissvote_imp)+byelection +
>                    inflation_imp +
>                    type_budget + type_treaty + type_general + law_new, dat))
> 
> # robustness to lag specifications - 5 months
> # Table A10
> sink("TableA10.tex")
> stargazer(reg1a_lag5, reg1_lag5, reg2a_lag5, reg2_lag5,
>           keep = c("wticonstant*", "oil_gross*", "ideology_binary", "ideoaffil*", "infl"),
>           covariate.labels = c("WTI Price", "Oil Revenues", 
>                                "Ideology Dummy", "Cabinet Affiliate - 5 month lag",
>                                "Inflation"),
>           add.lines = list(c("Term FEs", rep("\\checkmark", 8)),
>                            c("MP FEs", rep(c("", "\\checkmark"), 4)),
>                            c("MP controls",rep(c("\\checkmark", ""), 4)),
>                            c("Law controls", rep("\\checkmark", 8))),
>           dep.var.labels = "Voting with regime",
>           omit.stat = c("ser", "adj.rsq", "f"),
>           star.cutoffs = c(0.05, 0.01, 0.001))
> sink()
> 
> 
> 
> 
> # Figure A4 ---------------------------------------------------------------
> 
> 
> lawdat<- dat %>%
>   filter(mp_exact == 1 & min_exact == 0) %>%
>   mutate(lawtype = ifelse(type_budget == 1, "Budget",
>                           ifelse(type_general == 1, "General",
>                                  ifelse(type_treaty == 1, "Treaty/Int'l",
>                                         "Final Account")))) %>%
>   group_by(lawtype, lawcodes) %>%
>   summarise(coop = mean(votewithmin_rulechange))
> 
> # Figure A4
> fa4<- lawdat %>%
>   group_by(lawtype) %>% mutate(mn = mean(coop)) %>%
>   ungroup() %>%
>   mutate(Type = fct_reorder(lawtype, (mn))) %>% 
>   ggplot(aes(x = Type, y = coop)) + geom_boxplot() + coord_flip() +
>   theme_bw() + 
>   ylab("Prop. MPs voting with ministers (second deliberation level)") +
>   xlab("")
> 
> ggsave(fa4, filename = "FigureA4.pdf",
>       height = 5, width = 7)
> 
> 
> 
> # Figure A3 ---------------------------------------------------------------
> 
> votedf %>% ##
>   distinct(date,lawcodes)
> 
> votedf %>% ##
>   distinct(date,lawcodes) %>% 
>   separate_rows(everything(), sep = ";") %>% filter(lawcodes !="")
> 
> fa3 <-
>   ggplot(NULL, aes(x=date)) + 
>   geom_histogram(
>     binwidth=150,
>     position = 'identity',
>     data = votedf %>% distinct(date,lawcodes) %>% separate_rows(everything(), sep = ";") %>% filter(lawcodes !=""),
>     fill="lightgray") +
>   geom_histogram(
>     binwidth=150,
>     position = 'identity',
>     data = votedf %>% distinct(date,lawcodes),
>     fill="black") +
>   ylab("Laws (count)") + xlab(NULL) +
>   theme_bw() +
>   theme(
>     text = element_text(size=18),
>     axis.title = element_text(size=14),
>     axis.text.x = element_text(size=12),
>     axis.text.y = element_text(size=12),
>     axis.line = element_line(colour = "black"),
>     legend.position="bottom",
>     legend.key.width = unit(2,"cm"),
>     legend.text = element_text(size=14),
>     legend.title=element_blank(),
>     panel.grid.major.x = element_blank(),
>     panel.grid.minor = element_blank()) +
>   scale_x_date(
>     date_labels = "%Y",
>     breaks = function(x) seq.Date(from = min(as.Date("1960-01-01")), to = max(as.Date("2021-01-01")), by = "5 years"),
>     minor_breaks = NULL,
>     expand=c(0.01,0)) +
>   scale_y_continuous(
>     breaks=seq(0, 400, 50),
>     limits=c(0, 450),
>     minor_breaks = NULL,
>     expand = c(0, .02)) +
>   geom_vline(xintercept = as.Date(c("1963-1-23", "1967-1-25", "1971-1-23", "1975-1-27", "1981-2-23",
>                                     "1985-2-26", "1992-10-5", "1996-10-7", "1999-7-3", "2003-7-6",
>                                     "2006-6-29", "2008-5-17", "2009-5-16", "2012-2-1", "2012-12-1",
>                                     "2013-7-27", "2016-11-29")), linetype="dashed", color=c("gray"))
> 
> ggsave(fa3, filename = "FigureA3.pdf",
>       height = 5, width = 7)
> 
> 
> 
> 
> 
> 
> 
> ####
> 
> log_close()

filter: removed 145,285 rows (86%), 23,191 rows remaining

NOTE: Log Print Time:  2024-07-26 13:04:34.452242 
NOTE: Elapsed Time: 0.97672700881958 secs 

group_by: 3 grouping variables (lawcodes, term, term_year)

NOTE: Log Print Time:  2024-07-26 13:04:34.466361 
NOTE: Elapsed Time: 0.0141191482543945 secs 

summarise: now 2,693 rows and 12 columns, 2 group variables remaining (lawcodes, term)

NOTE: Log Print Time:  2024-07-26 13:04:34.539257 
NOTE: Elapsed Time: 0.0728960037231445 secs 

filter (grouped): removed 2,663 rows (99%), 30 rows remaining (removed 2,663 groups, 30 groups remaining)

NOTE: Log Print Time:  2024-07-26 13:04:34.564779 
NOTE: Elapsed Time: 0.025521993637085 secs 

filter (grouped): removed 2,688 rows (>99%), 5 rows remaining (removed 2,688 groups, 5 groups remaining)

NOTE: Log Print Time:  2024-07-26 13:04:34.592767 
NOTE: Elapsed Time: 0.0279879570007324 secs 

select: dropped 9 variables (term_year, minpresent, minyes, minno, minabs, …)

NOTE: Log Print Time:  2024-07-26 13:04:34.748691 
NOTE: Elapsed Time: 0.155924081802368 secs 

full_join: added 71 columns (nyes, nno, npresent, date, vote, …)

NOTE: Log Print Time:  2024-07-26 13:04:35.234067 
NOTE: Elapsed Time: 0.485375881195068 secs 

           > rows only in x             0

NOTE: Log Print Time:  2024-07-26 13:04:35.281696 
NOTE: Elapsed Time: 0.0476291179656982 secs 

           > rows only in votedf        0

NOTE: Log Print Time:  2024-07-26 13:04:35.287591 
NOTE: Elapsed Time: 0.00589489936828613 secs 

           > matched rows         168,476    (includes duplicates)

NOTE: Log Print Time:  2024-07-26 13:04:35.293718 
NOTE: Elapsed Time: 0.00612711906433105 secs 

           >                     =========

NOTE: Log Print Time:  2024-07-26 13:04:35.299552 
NOTE: Elapsed Time: 0.00583386421203613 secs 

           > rows total           168,476

NOTE: Log Print Time:  2024-07-26 13:04:35.304976 
NOTE: Elapsed Time: 0.00542402267456055 secs 

filter (grouped): removed 75,888 rows (45%), 92,588 rows remaining (removed 0 groups, 2,693 groups remaining)

NOTE: Log Print Time:  2024-07-26 13:04:35.372394 
NOTE: Elapsed Time: 0.067418098449707 secs 

filter (grouped): removed 1,122 rows (1%), 91,466 rows remaining (removed 30 groups, 2,663 groups remaining)

NOTE: Log Print Time:  2024-07-26 13:04:35.519331 
NOTE: Elapsed Time: 0.146936893463135 secs 

filter (grouped): removed 228 rows (<1%), 91,238 rows remaining (removed 5 groups, 2,658 groups remaining)

NOTE: Log Print Time:  2024-07-26 13:04:35.675086 
NOTE: Elapsed Time: 0.155755043029785 secs 

mutate (grouped): new variable 'rulechange' (double) with 2 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:04:38.556353 
NOTE: Elapsed Time: 2.88126707077026 secs 

mutate (grouped): new variable 'votewithmin' (double) with 2 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:04:38.70422 
NOTE: Elapsed Time: 0.14786696434021 secs 

                  new variable 'votewithmin_abs' (double) with 2 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:04:38.715164 
NOTE: Elapsed Time: 0.0109438896179199 secs 

                  new variable 'abs_no' (double) with 2 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:04:38.724109 
NOTE: Elapsed Time: 0.00894498825073242 secs 

mutate (grouped): new variable 'votewithmin_rulechange' (double) with 2 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:04:38.768984 
NOTE: Elapsed Time: 0.0448751449584961 secs 

filter: removed 34,108 rows (20%), 134,368 rows remaining

NOTE: Log Print Time:  2024-07-26 13:04:38.824878 
NOTE: Elapsed Time: 0.0558938980102539 secs 

filter: removed 126,543 rows (75%), 41,933 rows remaining

NOTE: Log Print Time:  2024-07-26 13:04:38.987906 
NOTE: Elapsed Time: 0.163028001785278 secs 

[1] "Warning: `data_frame()` was deprecated in tibble 1.1.0."
[2] "Warning: Please use `tibble()` instead."                

NOTE: Log Print Time:  2024-07-26 13:04:39.295002 
NOTE: Elapsed Time: 0.307096004486084 secs 

mutate: converted 'Action' from character to factor (0 new NA)

NOTE: Log Print Time:  2024-07-26 13:04:39.30394 
NOTE: Elapsed Time: 0.00893807411193848 secs 

filter (grouped): removed 8,852 rows (10%), 82,386 rows remaining (removed 0 groups, 2,658 groups remaining)

NOTE: Log Print Time:  2024-07-26 13:04:42.628472 
NOTE: Elapsed Time: 3.32453203201294 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:09.746298 
NOTE: Elapsed Time: 27.1178259849548 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:09.756377 
NOTE: Elapsed Time: 0.0100789070129395 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:09.762432 
NOTE: Elapsed Time: 0.00605511665344238 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:09.770531 
NOTE: Elapsed Time: 0.00809884071350098 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:09.778262 
NOTE: Elapsed Time: 0.00773096084594727 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:05:09.843061 
NOTE: Elapsed Time: 0.0647990703582764 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:05:10.029192 
NOTE: Elapsed Time: 0.186131000518799 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:05:10.183918 
NOTE: Elapsed Time: 0.154726028442383 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:10.573316 
NOTE: Elapsed Time: 0.389398097991943 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:10.581266 
NOTE: Elapsed Time: 0.0079498291015625 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:10.609774 
NOTE: Elapsed Time: 0.028508186340332 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:10.621381 
NOTE: Elapsed Time: 0.0116069316864014 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:10.636009 
NOTE: Elapsed Time: 0.0146279335021973 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:05:10.67566 
NOTE: Elapsed Time: 0.0396509170532227 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:05:10.843146 
NOTE: Elapsed Time: 0.167486190795898 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:05:10.932479 
NOTE: Elapsed Time: 0.0893328189849854 secs 

filter (grouped): removed 67,080 rows (81%), 15,306 rows remaining (removed 2,165 groups, 493 groups remaining)

NOTE: Log Print Time:  2024-07-26 13:05:11.962374 
NOTE: Elapsed Time: 1.02989506721497 secs 

filter (grouped): removed 67,080 rows (81%), 15,306 rows remaining (removed 2,165 groups, 493 groups remaining)

NOTE: Log Print Time:  2024-07-26 13:05:12.097081 
NOTE: Elapsed Time: 0.134706974029541 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:12.382614 
NOTE: Elapsed Time: 0.28553295135498 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:12.386771 
NOTE: Elapsed Time: 0.00415706634521484 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:12.392594 
NOTE: Elapsed Time: 0.00582313537597656 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:12.400604 
NOTE: Elapsed Time: 0.00800991058349609 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:12.411991 
NOTE: Elapsed Time: 0.0113868713378906 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:05:12.451758 
NOTE: Elapsed Time: 0.0397670269012451 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:05:12.518389 
NOTE: Elapsed Time: 0.0666310787200928 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:12.611072 
NOTE: Elapsed Time: 0.0926830768585205 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:12.615943 
NOTE: Elapsed Time: 0.00487089157104492 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:12.624364 
NOTE: Elapsed Time: 0.00842094421386719 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:12.632761 
NOTE: Elapsed Time: 0.00839710235595703 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:12.645547 
NOTE: Elapsed Time: 0.0127859115600586 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:05:12.692073 
NOTE: Elapsed Time: 0.0465261936187744 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:05:12.747868 
NOTE: Elapsed Time: 0.0557949542999268 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:13.518655 
NOTE: Elapsed Time: 0.770787000656128 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:13.528678 
NOTE: Elapsed Time: 0.0100228786468506 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:13.562855 
NOTE: Elapsed Time: 0.0341770648956299 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:13.573319 
NOTE: Elapsed Time: 0.0104639530181885 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:13.584232 
NOTE: Elapsed Time: 0.0109131336212158 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:05:13.648171 
NOTE: Elapsed Time: 0.0639388561248779 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:13.714346 
NOTE: Elapsed Time: 0.0661749839782715 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:13.720022 
NOTE: Elapsed Time: 0.0056760311126709 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:13.726678 
NOTE: Elapsed Time: 0.00665593147277832 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:13.739487 
NOTE: Elapsed Time: 0.0128090381622314 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:13.748856 
NOTE: Elapsed Time: 0.0093691349029541 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:05:13.795608 
NOTE: Elapsed Time: 0.0467519760131836 secs 

mutate: new variable 'key' (character) with one unique value and 0% NA

NOTE: Log Print Time:  2024-07-26 13:05:13.995304 
NOTE: Elapsed Time: 0.199696063995361 secs 

mutate: new variable 'gdp_adj' (double) with 47 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:05:14.205335 
NOTE: Elapsed Time: 0.210030794143677 secs 

gather: reorganized (oilrents_adj, gdp_adj) into (key, value) [was 47x7, now 94x7]

NOTE: Log Print Time:  2024-07-26 13:05:14.217404 
NOTE: Elapsed Time: 0.0120689868927002 secs 

mutate: new variable 'key2' (character) with 2 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:05:14.22756 
NOTE: Elapsed Time: 0.0101561546325684 secs 

mutate: new variable 'cab_group' (character) with 9 unique values and 47% NA

NOTE: Log Print Time:  2024-07-26 13:05:16.542145 
NOTE: Elapsed Time: 2.31458497047424 secs 

filter: removed 126,543 rows (75%), 41,933 rows remaining

NOTE: Log Print Time:  2024-07-26 13:05:16.5823 
NOTE: Elapsed Time: 0.0401549339294434 secs 

select: dropped 71 variables (nyes, nno, npresent, lawcodes, vote, …)

NOTE: Log Print Time:  2024-07-26 13:05:16.589749 
NOTE: Elapsed Time: 0.00744915008544922 secs 

group_by: one grouping variable (date)

NOTE: Log Print Time:  2024-07-26 13:05:16.91738 
NOTE: Elapsed Time: 0.327630996704102 secs 

summarise: now 766 rows and 10 columns, ungrouped

NOTE: Log Print Time:  2024-07-26 13:05:17.083881 
NOTE: Elapsed Time: 0.166500806808472 secs 

gather: reorganized (sabah, mb, islamist, lp, natlib, …) into (type, number) [was 766x10, now 6128x4]

NOTE: Log Print Time:  2024-07-26 13:05:17.311232 
NOTE: Elapsed Time: 0.227351188659668 secs 

mutate: converted 'type' from character to factor (0 new NA)

NOTE: Log Print Time:  2024-07-26 13:05:17.54902 
NOTE: Elapsed Time: 0.237787961959839 secs 

        new variable 'prop' (double) with 35 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:05:17.576435 
NOTE: Elapsed Time: 0.0274150371551514 secs 

group_by: one grouping variable (term_year)

NOTE: Log Print Time:  2024-07-26 13:05:21.506641 
NOTE: Elapsed Time: 3.93020582199097 secs 

mutate (grouped): new variable 'termstart' (Date) with 16 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:05:22.046419 
NOTE: Elapsed Time: 0.539777994155884 secs 

mutate (grouped): new variable 'my' (Date) with 145 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:05:22.137662 
NOTE: Elapsed Time: 0.0912430286407471 secs 

group_by: 3 grouping variables (term_year, termstart, my)

NOTE: Log Print Time:  2024-07-26 13:05:22.211226 
NOTE: Elapsed Time: 0.0735640525817871 secs 

summarise: now 145 rows and 6 columns, 2 group variables remaining (term_year, termstart)

NOTE: Log Print Time:  2024-07-26 13:05:22.286643 
NOTE: Elapsed Time: 0.0754170417785645 secs 

ungroup: no grouping variables remain

NOTE: Log Print Time:  2024-07-26 13:05:22.298264 
NOTE: Elapsed Time: 0.0116209983825684 secs 

mutate: new variable 'ttl' (double) with 132 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:05:22.319143 
NOTE: Elapsed Time: 0.0208790302276611 secs 

[1] "Warning: `expand_scale()` was deprecated in ggplot2 3.3.0."
[2] "Warning: Please use `expansion()` instead."                

NOTE: Log Print Time:  2024-07-26 13:05:27.482627 
NOTE: Elapsed Time: 5.16348385810852 secs 

filter: removed 127,228 rows (76%), 41,248 rows remaining

NOTE: Log Print Time:  2024-07-26 13:05:28.728421 
NOTE: Elapsed Time: 1.24579405784607 secs 

select: dropped 69 variables (nyes, nno, npresent, date, lawcodes, …)

NOTE: Log Print Time:  2024-07-26 13:05:28.796197 
NOTE: Elapsed Time: 0.0677759647369385 secs 

group_by: one grouping variable (term_year)

NOTE: Log Print Time:  2024-07-26 13:05:29.240022 
NOTE: Elapsed Time: 0.443825006484985 secs 

summarise: now 14 rows and 2 columns, ungrouped

NOTE: Log Print Time:  2024-07-26 13:05:29.252482 
NOTE: Elapsed Time: 0.0124599933624268 secs 

mutate: new variable 'group' (character) with one unique value and 0% NA

NOTE: Log Print Time:  2024-07-26 13:05:29.258951 
NOTE: Elapsed Time: 0.0064690113067627 secs 

filter: removed 36,258 rows (22%), 132,218 rows remaining

NOTE: Log Print Time:  2024-07-26 13:05:29.671423 
NOTE: Elapsed Time: 0.412472009658813 secs 

select: dropped 70 variables (nyes, nno, npresent, date, lawcodes, …)

NOTE: Log Print Time:  2024-07-26 13:05:29.693367 
NOTE: Elapsed Time: 0.0219440460205078 secs 

group_by: one grouping variable (term_year)

NOTE: Log Print Time:  2024-07-26 13:05:30.282812 
NOTE: Elapsed Time: 0.589445114135742 secs 

summarise: now 14 rows and 2 columns, ungrouped

NOTE: Log Print Time:  2024-07-26 13:05:30.2961 
NOTE: Elapsed Time: 0.0132877826690674 secs 

mutate: new variable 'group' (character) with one unique value and 0% NA

NOTE: Log Print Time:  2024-07-26 13:05:30.310499 
NOTE: Elapsed Time: 0.0143990516662598 secs 

filter: no rows removed

NOTE: Log Print Time:  2024-07-26 13:05:32.535424 
NOTE: Elapsed Time: 2.22492504119873 secs 

mutate: converted 'term_year' from double to character (0 new NA)

NOTE: Log Print Time:  2024-07-26 13:05:32.679513 
NOTE: Elapsed Time: 0.144088983535767 secs 

mutate: changed 2,792 values (2%) of 'term_year' (0 new NAs)

NOTE: Log Print Time:  2024-07-26 13:05:32.729575 
NOTE: Elapsed Time: 0.0500619411468506 secs 

group_by: one grouping variable (term_year)

NOTE: Log Print Time:  2024-07-26 13:05:32.750004 
NOTE: Elapsed Time: 0.0204291343688965 secs 

summarise: now 16 rows and 2 columns, ungrouped

NOTE: Log Print Time:  2024-07-26 13:05:32.76199 
NOTE: Elapsed Time: 0.0119860172271729 secs 

filter: removed 87 rows (2%), 3,595 rows remaining

NOTE: Log Print Time:  2024-07-26 13:05:32.7796 
NOTE: Elapsed Time: 0.0176098346710205 secs 

group_by: one grouping variable (term_year)

NOTE: Log Print Time:  2024-07-26 13:05:32.794999 
NOTE: Elapsed Time: 0.0153989791870117 secs 

summarise: now 16 rows and 3 columns, ungrouped

NOTE: Log Print Time:  2024-07-26 13:05:32.83044 
NOTE: Elapsed Time: 0.0354411602020264 secs 

full_join: added 2 columns (laws, missing)

NOTE: Log Print Time:  2024-07-26 13:05:32.89465 
NOTE: Elapsed Time: 0.0642099380493164 secs 

           > rows only in votedf %>% filter(!is.n..   0

NOTE: Log Print Time:  2024-07-26 13:05:32.918959 
NOTE: Elapsed Time: 0.0243089199066162 secs 

           > rows only in lawdat %>% filter(!is.n..   0

NOTE: Log Print Time:  2024-07-26 13:05:32.926228 
NOTE: Elapsed Time: 0.00726914405822754 secs 

           > matched rows                            16

NOTE: Log Print Time:  2024-07-26 13:05:32.934312 
NOTE: Elapsed Time: 0.00808405876159668 secs 

           >                                        ====

NOTE: Log Print Time:  2024-07-26 13:05:32.942039 
NOTE: Elapsed Time: 0.00772690773010254 secs 

           > rows total                              16

NOTE: Log Print Time:  2024-07-26 13:05:32.951032 
NOTE: Elapsed Time: 0.00899291038513184 secs 

mutate: new variable 'missing_prop' (double) with 14 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:05:32.960348 
NOTE: Elapsed Time: 0.00931596755981445 secs 

        new variable 'transcripts' (double) with 15 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:05:32.970069 
NOTE: Elapsed Time: 0.00972104072570801 secs 

filter: removed 34,108 rows (20%), 134,368 rows remaining

NOTE: Log Print Time:  2024-07-26 13:05:33.221877 
NOTE: Elapsed Time: 0.251808166503906 secs 

select: dropped 62 variables (nyes, nno, npresent, date, lawcodes, …)

NOTE: Log Print Time:  2024-07-26 13:05:33.23413 
NOTE: Elapsed Time: 0.0122528076171875 secs 

mutate: new variable 'age' (double) with 101 unique values and 6% NA

NOTE: Log Print Time:  2024-07-26 13:05:35.616153 
NOTE: Elapsed Time: 2.38202309608459 secs 

        new variable 'edu_known' (double) with 2 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:05:35.626279 
NOTE: Elapsed Time: 0.0101261138916016 secs 

mutate: changed 171 values (21%) of 'occ_recent' (171 fewer NAs)

NOTE: Log Print Time:  2024-07-26 13:05:35.644856 
NOTE: Elapsed Time: 0.0185768604278564 secs 

        new variable 'private' (double) with 2 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:05:35.654088 
NOTE: Elapsed Time: 0.0092320442199707 secs 

        new variable 'public' (double) with 2 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:05:35.674017 
NOTE: Elapsed Time: 0.0199289321899414 secs 

        new variable 'other' (double) with 2 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:05:35.684735 
NOTE: Elapsed Time: 0.0107181072235107 secs 

summarise: now one row and 19 columns, ungrouped

NOTE: Log Print Time:  2024-07-26 13:05:35.702596 
NOTE: Elapsed Time: 0.0178608894348145 secs 

filter: removed 126,543 rows (75%), 41,933 rows remaining

NOTE: Log Print Time:  2024-07-26 13:05:36.538997 
NOTE: Elapsed Time: 0.836400985717773 secs 

select: dropped 62 variables (nyes, nno, npresent, date, lawcodes, …)

NOTE: Log Print Time:  2024-07-26 13:05:36.553889 
NOTE: Elapsed Time: 0.0148921012878418 secs 

mutate: new variable 'age' (double) with 68 unique values and 9% NA

NOTE: Log Print Time:  2024-07-26 13:05:38.433719 
NOTE: Elapsed Time: 1.87982988357544 secs 

        new variable 'edu_known' (double) with 2 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:05:38.444211 
NOTE: Elapsed Time: 0.0104920864105225 secs 

mutate: changed 30 values (9%) of 'occ_recent' (30 fewer NAs)

NOTE: Log Print Time:  2024-07-26 13:05:38.455704 
NOTE: Elapsed Time: 0.0114929676055908 secs 

        new variable 'private' (double) with 2 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:05:38.462718 
NOTE: Elapsed Time: 0.00701403617858887 secs 

        new variable 'public' (double) with 2 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:05:38.46947 
NOTE: Elapsed Time: 0.00675201416015625 secs 

        new variable 'other' (double) with 2 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:05:38.476801 
NOTE: Elapsed Time: 0.00733089447021484 secs 

summarise: now one row and 19 columns, ungrouped

NOTE: Log Print Time:  2024-07-26 13:05:38.502083 
NOTE: Elapsed Time: 0.0252821445465088 secs 

select: dropped 69 variables (npresent, vote, name_kna_rcv, term, knaed_number, …)

NOTE: Log Print Time:  2024-07-26 13:05:39.381527 
NOTE: Elapsed Time: 0.879443883895874 secs 

rename: renamed one variable (lawcodes)

NOTE: Log Print Time:  2024-07-26 13:05:40.762917 
NOTE: Elapsed Time: 1.38139009475708 secs 

select: dropped 2 variables (term_year, ResponseId)

NOTE: Log Print Time:  2024-07-26 13:05:40.776383 
NOTE: Elapsed Time: 0.0134658813476562 secs 

filter (grouped): removed 2,666 rows (99%), 27 rows remaining (removed 2,666 groups, 27 groups remaining)

NOTE: Log Print Time:  2024-07-26 13:05:41.52721 
NOTE: Elapsed Time: 0.750827074050903 secs 

left_join: added 3 columns (date, nyes, nno)

NOTE: Log Print Time:  2024-07-26 13:05:41.578972 
NOTE: Elapsed Time: 0.0517621040344238 secs 

           > rows only in x         0

NOTE: Log Print Time:  2024-07-26 13:05:41.610478 
NOTE: Elapsed Time: 0.031505823135376 secs 

           > rows only in laws (2,666)

NOTE: Log Print Time:  2024-07-26 13:05:41.617411 
NOTE: Elapsed Time: 0.00693297386169434 secs 

           > matched rows          27

NOTE: Log Print Time:  2024-07-26 13:05:41.62623 
NOTE: Elapsed Time: 0.0088191032409668 secs 

           >                   =======

NOTE: Log Print Time:  2024-07-26 13:05:41.637736 
NOTE: Elapsed Time: 0.0115060806274414 secs 

           > rows total            27

NOTE: Log Print Time:  2024-07-26 13:05:41.651554 
NOTE: Elapsed Time: 0.0138180255889893 secs 

mutate (grouped): new variable 'lawcode' (double) with 27 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:05:41.700571 
NOTE: Elapsed Time: 0.0490169525146484 secs 

left_join: added 3 columns (lawtype, lawtopic, law_title)

NOTE: Log Print Time:  2024-07-26 13:05:41.784239 
NOTE: Elapsed Time: 0.0836679935455322 secs 

           > rows only in x                  0

NOTE: Log Print Time:  2024-07-26 13:05:41.857261 
NOTE: Elapsed Time: 0.0730218887329102 secs 

           > rows only in lawdat_select (3,655)

NOTE: Log Print Time:  2024-07-26 13:05:41.896886 
NOTE: Elapsed Time: 0.0396251678466797 secs 

           > matched rows                   27

NOTE: Log Print Time:  2024-07-26 13:05:41.910598 
NOTE: Elapsed Time: 0.0137119293212891 secs 

           >                            =======

NOTE: Log Print Time:  2024-07-26 13:05:41.936871 
NOTE: Elapsed Time: 0.0262730121612549 secs 

           > rows total                     27

NOTE: Log Print Time:  2024-07-26 13:05:41.95223 
NOTE: Elapsed Time: 0.0153589248657227 secs 

ungroup: no grouping variables remain

NOTE: Log Print Time:  2024-07-26 13:05:41.963432 
NOTE: Elapsed Time: 0.0112020969390869 secs 

mutate: new variable 'mp_no' (double) with 9 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:05:41.975023 
NOTE: Elapsed Time: 0.0115909576416016 secs 

        new variable 'mp_margin' (double) with 18 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:05:42.017448 
NOTE: Elapsed Time: 0.0424249172210693 secs 

filter: removed one row (4%), 26 rows remaining

NOTE: Log Print Time:  2024-07-26 13:05:42.031905 
NOTE: Elapsed Time: 0.0144569873809814 secs 

mutate: new variable 'prediss' (character) with 2 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:05:42.048133 
NOTE: Elapsed Time: 0.0162279605865479 secs 

select: dropped 15 variables (lawcodes, term, minpresent, minyes, minabs, …)

NOTE: Log Print Time:  2024-07-26 13:05:42.058738 
NOTE: Elapsed Time: 0.0106050968170166 secs 

mutate: converted 'date' from Date to character (0 new NA)

NOTE: Log Print Time:  2024-07-26 13:05:42.072731 
NOTE: Elapsed Time: 0.0139930248260498 secs 

        changed 26 values (100%) of 'lawtype' (0 new NAs)

NOTE: Log Print Time:  2024-07-26 13:05:42.08249 
NOTE: Elapsed Time: 0.00975894927978516 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:44.908909 
NOTE: Elapsed Time: 2.82641911506653 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:44.915071 
NOTE: Elapsed Time: 0.00616192817687988 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:44.925529 
NOTE: Elapsed Time: 0.0104579925537109 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:44.935053 
NOTE: Elapsed Time: 0.00952410697937012 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:44.962122 
NOTE: Elapsed Time: 0.0270688533782959 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:05:45.035213 
NOTE: Elapsed Time: 0.0730910301208496 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:05:45.895963 
NOTE: Elapsed Time: 0.860749959945679 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:05:46.024857 
NOTE: Elapsed Time: 0.128894090652466 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:46.838627 
NOTE: Elapsed Time: 0.813770055770874 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:46.843898 
NOTE: Elapsed Time: 0.00527095794677734 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:46.851353 
NOTE: Elapsed Time: 0.00745487213134766 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:46.858629 
NOTE: Elapsed Time: 0.00727605819702148 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:46.865807 
NOTE: Elapsed Time: 0.00717806816101074 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:05:46.900203 
NOTE: Elapsed Time: 0.0343959331512451 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:05:47.893628 
NOTE: Elapsed Time: 0.993424892425537 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:05:48.339337 
NOTE: Elapsed Time: 0.445709228515625 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:49.802644 
NOTE: Elapsed Time: 1.46330690383911 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:49.816393 
NOTE: Elapsed Time: 0.0137488842010498 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:49.863257 
NOTE: Elapsed Time: 0.0468640327453613 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:49.881257 
NOTE: Elapsed Time: 0.0180001258850098 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:49.899382 
NOTE: Elapsed Time: 0.018125057220459 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:05:50.06195 
NOTE: Elapsed Time: 0.162567853927612 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:50.302552 
NOTE: Elapsed Time: 0.240602016448975 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:50.31555 
NOTE: Elapsed Time: 0.012998104095459 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:50.328468 
NOTE: Elapsed Time: 0.0129179954528809 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:50.348578 
NOTE: Elapsed Time: 0.0201098918914795 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:05:50.363425 
NOTE: Elapsed Time: 0.0148470401763916 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:05:50.409933 
NOTE: Elapsed Time: 0.0465080738067627 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:12:36.456251 
NOTE: Elapsed Time: 6.76743863026301 mins 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:12:36.524745 
NOTE: Elapsed Time: 0.0684940814971924 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:12:36.537627 
NOTE: Elapsed Time: 0.0128819942474365 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:12:36.546616 
NOTE: Elapsed Time: 0.00898909568786621 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:12:36.562601 
NOTE: Elapsed Time: 0.0159850120544434 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:12:36.658854 
NOTE: Elapsed Time: 0.0962529182434082 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:12:36.963474 
NOTE: Elapsed Time: 0.304620027542114 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:12:37.079419 
NOTE: Elapsed Time: 0.115944862365723 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:12:37.497664 
NOTE: Elapsed Time: 0.418245077133179 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:12:37.504829 
NOTE: Elapsed Time: 0.00716495513916016 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:12:37.51768 
NOTE: Elapsed Time: 0.0128509998321533 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:12:37.524824 
NOTE: Elapsed Time: 0.00714397430419922 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:12:37.531618 
NOTE: Elapsed Time: 0.00679421424865723 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:12:37.579887 
NOTE: Elapsed Time: 0.0482687950134277 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:12:37.749801 
NOTE: Elapsed Time: 0.16991400718689 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:12:37.828266 
NOTE: Elapsed Time: 0.0784649848937988 secs 

mutate (grouped): new variable 'abs_pro' (double) with 2 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:12:41.308078 
NOTE: Elapsed Time: 3.47981214523315 secs 

                  new variable 'abs_neg' (double) with 2 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:12:41.314548 
NOTE: Elapsed Time: 0.0064699649810791 secs 

filter (grouped): removed 4,714 rows (5%), 86,524 rows remaining (removed 0 groups, 2,658 groups remaining)

NOTE: Log Print Time:  2024-07-26 13:12:41.382228 
NOTE: Elapsed Time: 0.0676798820495605 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:13:15.327962 
NOTE: Elapsed Time: 33.9457340240479 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:13:15.338061 
NOTE: Elapsed Time: 0.0100991725921631 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:13:15.344982 
NOTE: Elapsed Time: 0.00692081451416016 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:13:15.35249 
NOTE: Elapsed Time: 0.0075080394744873 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:13:15.360448 
NOTE: Elapsed Time: 0.00795793533325195 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:13:15.463116 
NOTE: Elapsed Time: 0.102668046951294 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:13:15.866209 
NOTE: Elapsed Time: 0.403093099594116 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:13:16.348547 
NOTE: Elapsed Time: 0.482337951660156 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:13:16.356248 
NOTE: Elapsed Time: 0.00770092010498047 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:13:16.372185 
NOTE: Elapsed Time: 0.0159370899200439 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:13:16.380138 
NOTE: Elapsed Time: 0.00795292854309082 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:13:16.386152 
NOTE: Elapsed Time: 0.00601410865783691 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:13:16.424557 
NOTE: Elapsed Time: 0.0384049415588379 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:13:16.657282 
NOTE: Elapsed Time: 0.232725143432617 secs 

select: dropped 9 variables (term_year, minpresent, minyes, minno, minabs, …)

NOTE: Log Print Time:  2024-07-26 13:13:17.177273 
NOTE: Elapsed Time: 0.519990921020508 secs 

full_join: added 71 columns (nyes, nno, npresent, date, vote, …)

NOTE: Log Print Time:  2024-07-26 13:13:17.31809 
NOTE: Elapsed Time: 0.140816926956177 secs 

           > rows only in x             0

NOTE: Log Print Time:  2024-07-26 13:13:17.369012 
NOTE: Elapsed Time: 0.050922155380249 secs 

           > rows only in votedf        0

NOTE: Log Print Time:  2024-07-26 13:13:17.373974 
NOTE: Elapsed Time: 0.00496196746826172 secs 

           > matched rows         168,476    (includes duplicates)

NOTE: Log Print Time:  2024-07-26 13:13:17.379386 
NOTE: Elapsed Time: 0.00541186332702637 secs 

           >                     =========

NOTE: Log Print Time:  2024-07-26 13:13:17.384872 
NOTE: Elapsed Time: 0.00548601150512695 secs 

           > rows total           168,476

NOTE: Log Print Time:  2024-07-26 13:13:17.394527 
NOTE: Elapsed Time: 0.00965499877929688 secs 

filter (grouped): removed 41,933 rows (25%), 126,543 rows remaining (removed 0 groups, 2,693 groups remaining)

NOTE: Log Print Time:  2024-07-26 13:13:17.46808 
NOTE: Elapsed Time: 0.0735530853271484 secs 

filter (grouped): removed 1,382 rows (1%), 125,161 rows remaining (removed 30 groups, 2,663 groups remaining)

NOTE: Log Print Time:  2024-07-26 13:13:17.885921 
NOTE: Elapsed Time: 0.417840957641602 secs 

filter (grouped): removed 245 rows (<1%), 124,916 rows remaining (removed 5 groups, 2,658 groups remaining)

NOTE: Log Print Time:  2024-07-26 13:13:17.945328 
NOTE: Elapsed Time: 0.0594069957733154 secs 

mutate (grouped): new variable 'rulechange' (double) with 2 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:13:20.699543 
NOTE: Elapsed Time: 2.75421500205994 secs 

mutate (grouped): new variable 'votewithmin' (double) with 3 unique values and 31% NA

NOTE: Log Print Time:  2024-07-26 13:13:20.842771 
NOTE: Elapsed Time: 0.143228054046631 secs 

                  new variable 'votewithmin_abs' (double) with 3 unique values and 31% NA

NOTE: Log Print Time:  2024-07-26 13:13:20.854701 
NOTE: Elapsed Time: 0.011929988861084 secs 

                  new variable 'abs_no' (double) with 3 unique values and 31% NA

NOTE: Log Print Time:  2024-07-26 13:13:20.867223 
NOTE: Elapsed Time: 0.0125219821929932 secs 

mutate (grouped): new variable 'votewithmin_rulechange' (double) with 3 unique values and 31% NA

NOTE: Log Print Time:  2024-07-26 13:13:20.905336 
NOTE: Elapsed Time: 0.0381128787994385 secs 

mutate (grouped): new variable 'abs_pro' (double) with 3 unique values and 31% NA

NOTE: Log Print Time:  2024-07-26 13:13:23.716051 
NOTE: Elapsed Time: 2.81071519851685 secs 

                  new variable 'abs_neg' (double) with 3 unique values and 31% NA

NOTE: Log Print Time:  2024-07-26 13:13:23.728768 
NOTE: Elapsed Time: 0.0127170085906982 secs 

mutate (grouped): new variable 'vote_abs_pro' (double) with 2 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:13:23.798152 
NOTE: Elapsed Time: 0.0693838596343994 secs 

                  new variable 'vote_abs_anti' (double) with 2 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:13:23.808961 
NOTE: Elapsed Time: 0.0108089447021484 secs 

                  new variable 'na_vote' (double) with 2 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:13:23.817527 
NOTE: Elapsed Time: 0.00856614112854004 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:14:11.419326 
NOTE: Elapsed Time: 47.6017990112305 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:14:11.425359 
NOTE: Elapsed Time: 0.00603294372558594 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:14:11.432357 
NOTE: Elapsed Time: 0.00699806213378906 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:14:11.439373 
NOTE: Elapsed Time: 0.00701594352722168 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:14:11.446934 
NOTE: Elapsed Time: 0.00756096839904785 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:14:12.090668 
NOTE: Elapsed Time: 0.643733978271484 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:14:12.138799 
NOTE: Elapsed Time: 0.048130989074707 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:14:12.153591 
NOTE: Elapsed Time: 0.0147919654846191 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:14:12.167646 
NOTE: Elapsed Time: 0.0140550136566162 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:14:12.179429 
NOTE: Elapsed Time: 0.0117831230163574 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:14:39.487089 
NOTE: Elapsed Time: 27.3076598644257 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:14:39.501181 
NOTE: Elapsed Time: 0.014091968536377 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:14:39.618006 
NOTE: Elapsed Time: 0.116825103759766 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:14:39.630556 
NOTE: Elapsed Time: 0.0125501155853271 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:14:39.655944 
NOTE: Elapsed Time: 0.0253880023956299 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:14:39.758519 
NOTE: Elapsed Time: 0.102574825286865 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:14:40.046133 
NOTE: Elapsed Time: 0.287614107131958 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:14:40.275912 
NOTE: Elapsed Time: 0.229779005050659 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:14:40.700549 
NOTE: Elapsed Time: 0.424636840820312 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:14:40.711384 
NOTE: Elapsed Time: 0.0108351707458496 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:14:40.726978 
NOTE: Elapsed Time: 0.0155940055847168 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:14:40.740212 
NOTE: Elapsed Time: 0.0132339000701904 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:14:40.755356 
NOTE: Elapsed Time: 0.0151441097259521 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:14:40.799232 
NOTE: Elapsed Time: 0.0438759326934814 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:14:40.982471 
NOTE: Elapsed Time: 0.183238983154297 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:14:41.102258 
NOTE: Elapsed Time: 0.119786977767944 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:15:08.40702 
NOTE: Elapsed Time: 27.3047621250153 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:15:08.415406 
NOTE: Elapsed Time: 0.00838589668273926 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:15:08.422193 
NOTE: Elapsed Time: 0.00678706169128418 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:15:08.428367 
NOTE: Elapsed Time: 0.00617384910583496 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:15:08.435627 
NOTE: Elapsed Time: 0.00726008415222168 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:15:08.540754 
NOTE: Elapsed Time: 0.105127096176147 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:15:08.764888 
NOTE: Elapsed Time: 0.224133968353271 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:15:08.871062 
NOTE: Elapsed Time: 0.106173992156982 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:15:09.331383 
NOTE: Elapsed Time: 0.460320949554443 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:15:09.338715 
NOTE: Elapsed Time: 0.00733208656311035 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:15:09.347939 
NOTE: Elapsed Time: 0.00922393798828125 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:15:09.3579 
NOTE: Elapsed Time: 0.00996088981628418 secs 

Warning: length of NULL cannot be changed 

NOTE: Log Print Time:  2024-07-26 13:15:09.366576 
NOTE: Elapsed Time: 0.00867605209350586 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:15:09.426965 
NOTE: Elapsed Time: 0.0603890419006348 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:15:09.635497 
NOTE: Elapsed Time: 0.208532094955444 secs 

Warning: number of rows of result is not a multiple of vector length (arg 2) 

NOTE: Log Print Time:  2024-07-26 13:15:09.706437 
NOTE: Elapsed Time: 0.0709400177001953 secs 

filter (grouped): no rows removed

NOTE: Log Print Time:  2024-07-26 13:15:10.343905 
NOTE: Elapsed Time: 0.637467861175537 secs 

mutate (grouped): new variable 'lawtype' (character) with 4 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:15:10.424022 
NOTE: Elapsed Time: 0.0801169872283936 secs 

group_by: 2 grouping variables (lawtype, lawcodes)

NOTE: Log Print Time:  2024-07-26 13:15:10.432234 
NOTE: Elapsed Time: 0.00821208953857422 secs 

summarise: now 2,658 rows and 3 columns, one group variable remaining (lawtype)

NOTE: Log Print Time:  2024-07-26 13:15:10.457589 
NOTE: Elapsed Time: 0.0253548622131348 secs 

group_by: one grouping variable (lawtype)

NOTE: Log Print Time:  2024-07-26 13:15:10.494641 
NOTE: Elapsed Time: 0.0370521545410156 secs 

mutate (grouped): new variable 'mn' (double) with 4 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:15:10.50191 
NOTE: Elapsed Time: 0.00726890563964844 secs 

ungroup: no grouping variables remain

NOTE: Log Print Time:  2024-07-26 13:15:10.507651 
NOTE: Elapsed Time: 0.00574111938476562 secs 

mutate: new variable 'Type' (factor) with 4 unique values and 0% NA

NOTE: Log Print Time:  2024-07-26 13:15:10.5252 
NOTE: Elapsed Time: 0.0175487995147705 secs 

distinct: removed 165,783 rows (98%), 2,693 rows remaining

NOTE: Log Print Time:  2024-07-26 13:15:10.709721 
NOTE: Elapsed Time: 0.184521198272705 secs 

distinct: removed 165,783 rows (98%), 2,693 rows remaining

NOTE: Log Print Time:  2024-07-26 13:15:10.825851 
NOTE: Elapsed Time: 0.116129875183105 secs 

filter: removed 4 rows (<1%), 3,337 rows remaining

NOTE: Log Print Time:  2024-07-26 13:15:10.947373 
NOTE: Elapsed Time: 0.121521949768066 secs 

distinct: removed 165,783 rows (98%), 2,693 rows remaining

NOTE: Log Print Time:  2024-07-26 13:15:11.396609 
NOTE: Elapsed Time: 0.449236154556274 secs 

filter: removed 4 rows (<1%), 3,337 rows remaining

NOTE: Log Print Time:  2024-07-26 13:15:11.465422 
NOTE: Elapsed Time: 0.0688128471374512 secs 

distinct: removed 165,783 rows (98%), 2,693 rows remaining

NOTE: Log Print Time:  2024-07-26 13:15:11.481963 
NOTE: Elapsed Time: 0.0165410041809082 secs 

========================================================================= 
Log End Time: 2024-07-26 13:15:12.074613 
Log Elapsed Time: 0 00:10:38 
========================================================================= 
